<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>knet: E:/knet-git/knet/knet/channel.h 文件参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">knet
   &#160;<span id="projectnumber">1.4.5</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="modules.html"><span>模块</span></a></li>
      <li><a href="annotated.html"><span>结构体</span></a></li>
      <li class="current"><a href="files.html"><span>文件</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>文件列表</span></a></li>
      <li><a href="globals.html"><span>全局定义</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_885cc87fac2d91e269af0a5a959fa5f6.html">E:</a></li><li class="navelem"><a class="el" href="dir_4e74998c9a9305a116abc25fcf9a1edb.html">knet-git</a></li><li class="navelem"><a class="el" href="dir_a1c045b39f32066568ae964b52db514f.html">knet</a></li><li class="navelem"><a class="el" href="dir_f76d03789f0b12416cfffea59e2ed47d.html">knet</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">函数</a>  </div>
  <div class="headertitle">
<div class="title">channel.h 文件参考</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="a00056_source.html">config.h</a>&quot;</code><br />
</div>
<p><a href="a00052_source.html">浏览源代码.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
函数</h2></td></tr>
<tr class="memitem:af1bfbfb5240375789fcc89b087280ad8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00056_aca9cd34897582aa9969245a93cc62fb5.html#aca9cd34897582aa9969245a93cc62fb5">kchannel_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00052_af1bfbfb5240375789fcc89b087280ad8.html#af1bfbfb5240375789fcc89b087280ad8">knet_channel_create</a> (uint32_t max_send_list_len, uint32_t recv_ring_len)</td></tr>
<tr class="memdesc:af1bfbfb5240375789fcc89b087280ad8"><td class="mdescLeft">&#160;</td><td class="mdescRight">创建一个kchannel_t实例  <a href="a00052_af1bfbfb5240375789fcc89b087280ad8.html#af1bfbfb5240375789fcc89b087280ad8">更多...</a><br /></td></tr>
<tr class="separator:af1bfbfb5240375789fcc89b087280ad8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6cfbae713bcd155703df7871a978dda6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00056_aca9cd34897582aa9969245a93cc62fb5.html#aca9cd34897582aa9969245a93cc62fb5">kchannel_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00052_a6cfbae713bcd155703df7871a978dda6.html#a6cfbae713bcd155703df7871a978dda6">knet_channel_create_exist_socket_fd</a> (<a class="el" href="a00056_a0d9e0afbf02fb6ed6c5b1415dce51b05.html#a0d9e0afbf02fb6ed6c5b1415dce51b05">socket_t</a> socket_fd, uint32_t max_send_list_len, uint32_t recv_ring_len)</td></tr>
<tr class="memdesc:a6cfbae713bcd155703df7871a978dda6"><td class="mdescLeft">&#160;</td><td class="mdescRight">创建一个kchannel_t实例  <a href="a00052_a6cfbae713bcd155703df7871a978dda6.html#a6cfbae713bcd155703df7871a978dda6">更多...</a><br /></td></tr>
<tr class="separator:a6cfbae713bcd155703df7871a978dda6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad6e14ad79303e00c50f1231bdf2447ff"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00052_ad6e14ad79303e00c50f1231bdf2447ff.html#ad6e14ad79303e00c50f1231bdf2447ff">knet_channel_destroy</a> (<a class="el" href="a00056_aca9cd34897582aa9969245a93cc62fb5.html#aca9cd34897582aa9969245a93cc62fb5">kchannel_t</a> *channel)</td></tr>
<tr class="memdesc:ad6e14ad79303e00c50f1231bdf2447ff"><td class="mdescLeft">&#160;</td><td class="mdescRight">销毁kchannel_t实例  <a href="a00052_ad6e14ad79303e00c50f1231bdf2447ff.html#ad6e14ad79303e00c50f1231bdf2447ff">更多...</a><br /></td></tr>
<tr class="separator:ad6e14ad79303e00c50f1231bdf2447ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b4008dc5d3faa3a445942b1eabe499f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00052_a0b4008dc5d3faa3a445942b1eabe499f.html#a0b4008dc5d3faa3a445942b1eabe499f">knet_channel_connect</a> (<a class="el" href="a00056_aca9cd34897582aa9969245a93cc62fb5.html#aca9cd34897582aa9969245a93cc62fb5">kchannel_t</a> *channel, const char *ip, int port)</td></tr>
<tr class="memdesc:a0b4008dc5d3faa3a445942b1eabe499f"><td class="mdescLeft">&#160;</td><td class="mdescRight">连接监听器  <a href="a00052_a0b4008dc5d3faa3a445942b1eabe499f.html#a0b4008dc5d3faa3a445942b1eabe499f">更多...</a><br /></td></tr>
<tr class="separator:a0b4008dc5d3faa3a445942b1eabe499f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a719cb5a1d455fe1af74348effd93ec6f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00052_a719cb5a1d455fe1af74348effd93ec6f.html#a719cb5a1d455fe1af74348effd93ec6f">knet_channel_accept</a> (<a class="el" href="a00056_aca9cd34897582aa9969245a93cc62fb5.html#aca9cd34897582aa9969245a93cc62fb5">kchannel_t</a> *channel, const char *ip, int port, int backlog)</td></tr>
<tr class="memdesc:a719cb5a1d455fe1af74348effd93ec6f"><td class="mdescLeft">&#160;</td><td class="mdescRight">监听  <a href="a00052_a719cb5a1d455fe1af74348effd93ec6f.html#a719cb5a1d455fe1af74348effd93ec6f">更多...</a><br /></td></tr>
<tr class="separator:a719cb5a1d455fe1af74348effd93ec6f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad9ce907288d44a762a93ff54c4a4a7af"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00052_ad9ce907288d44a762a93ff54c4a4a7af.html#ad9ce907288d44a762a93ff54c4a4a7af">knet_channel_close</a> (<a class="el" href="a00056_aca9cd34897582aa9969245a93cc62fb5.html#aca9cd34897582aa9969245a93cc62fb5">kchannel_t</a> *channel)</td></tr>
<tr class="memdesc:ad9ce907288d44a762a93ff54c4a4a7af"><td class="mdescLeft">&#160;</td><td class="mdescRight">关闭  <a href="a00052_ad9ce907288d44a762a93ff54c4a4a7af.html#ad9ce907288d44a762a93ff54c4a4a7af">更多...</a><br /></td></tr>
<tr class="separator:ad9ce907288d44a762a93ff54c4a4a7af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad7d429bb2a30ded75493a9ccf22bad63"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00052_ad7d429bb2a30ded75493a9ccf22bad63.html#ad7d429bb2a30ded75493a9ccf22bad63">knet_channel_send</a> (<a class="el" href="a00056_aca9cd34897582aa9969245a93cc62fb5.html#aca9cd34897582aa9969245a93cc62fb5">kchannel_t</a> *channel, const char *data, int size)</td></tr>
<tr class="memdesc:ad7d429bb2a30ded75493a9ccf22bad63"><td class="mdescLeft">&#160;</td><td class="mdescRight">发送 当发送链表为空的时候，会首先尝试直接发送到套接字缓冲区(zero copy)，否则会放到发送链表末尾等待 适当时机发送.  <a href="a00052_ad7d429bb2a30ded75493a9ccf22bad63.html#ad7d429bb2a30ded75493a9ccf22bad63">更多...</a><br /></td></tr>
<tr class="separator:ad7d429bb2a30ded75493a9ccf22bad63"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeef6af4f8e4d97905640ade15dc13c33"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00052_aeef6af4f8e4d97905640ade15dc13c33.html#aeef6af4f8e4d97905640ade15dc13c33">knet_channel_send_buffer</a> (<a class="el" href="a00056_aca9cd34897582aa9969245a93cc62fb5.html#aca9cd34897582aa9969245a93cc62fb5">kchannel_t</a> *channel, <a class="el" href="a00056_a4b09a7574cd440f9b94285ab73c81b4e.html#a4b09a7574cd440f9b94285ab73c81b4e">kbuffer_t</a> *send_buffer)</td></tr>
<tr class="memdesc:aeef6af4f8e4d97905640ade15dc13c33"><td class="mdescLeft">&#160;</td><td class="mdescRight">发送 放到发送链表末尾等待适当时机发送.  <a href="a00052_aeef6af4f8e4d97905640ade15dc13c33.html#aeef6af4f8e4d97905640ade15dc13c33">更多...</a><br /></td></tr>
<tr class="separator:aeef6af4f8e4d97905640ade15dc13c33"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6b94f1431ad03b1bc7497d5680f2c8fe"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00052_a6b94f1431ad03b1bc7497d5680f2c8fe.html#a6b94f1431ad03b1bc7497d5680f2c8fe">knet_channel_update_send</a> (<a class="el" href="a00056_aca9cd34897582aa9969245a93cc62fb5.html#aca9cd34897582aa9969245a93cc62fb5">kchannel_t</a> *channel)</td></tr>
<tr class="memdesc:a6b94f1431ad03b1bc7497d5680f2c8fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">可写事件通知  <a href="a00052_a6b94f1431ad03b1bc7497d5680f2c8fe.html#a6b94f1431ad03b1bc7497d5680f2c8fe">更多...</a><br /></td></tr>
<tr class="separator:a6b94f1431ad03b1bc7497d5680f2c8fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e79d45ab68ec6cc5c85425231f3e9a1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00052_a0e79d45ab68ec6cc5c85425231f3e9a1.html#a0e79d45ab68ec6cc5c85425231f3e9a1">knet_channel_update_recv</a> (<a class="el" href="a00056_aca9cd34897582aa9969245a93cc62fb5.html#aca9cd34897582aa9969245a93cc62fb5">kchannel_t</a> *channel)</td></tr>
<tr class="memdesc:a0e79d45ab68ec6cc5c85425231f3e9a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">可读事件通知  <a href="a00052_a0e79d45ab68ec6cc5c85425231f3e9a1.html#a0e79d45ab68ec6cc5c85425231f3e9a1">更多...</a><br /></td></tr>
<tr class="separator:a0e79d45ab68ec6cc5c85425231f3e9a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac1ff10cb6b113a65e108e4c7422c149"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00056_a0d9e0afbf02fb6ed6c5b1415dce51b05.html#a0d9e0afbf02fb6ed6c5b1415dce51b05">socket_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00052_aac1ff10cb6b113a65e108e4c7422c149.html#aac1ff10cb6b113a65e108e4c7422c149">knet_channel_get_socket_fd</a> (<a class="el" href="a00056_aca9cd34897582aa9969245a93cc62fb5.html#aca9cd34897582aa9969245a93cc62fb5">kchannel_t</a> *channel)</td></tr>
<tr class="memdesc:aac1ff10cb6b113a65e108e4c7422c149"><td class="mdescLeft">&#160;</td><td class="mdescRight">取得套接字  <a href="a00052_aac1ff10cb6b113a65e108e4c7422c149.html#aac1ff10cb6b113a65e108e4c7422c149">更多...</a><br /></td></tr>
<tr class="separator:aac1ff10cb6b113a65e108e4c7422c149"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad289fcea4095b519b0ced40cfb89f693"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00056_a66d91f7667db1f0b2983fc25e1a20f1c.html#a66d91f7667db1f0b2983fc25e1a20f1c">kringbuffer_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00052_ad289fcea4095b519b0ced40cfb89f693.html#ad289fcea4095b519b0ced40cfb89f693">knet_channel_get_ringbuffer</a> (<a class="el" href="a00056_aca9cd34897582aa9969245a93cc62fb5.html#aca9cd34897582aa9969245a93cc62fb5">kchannel_t</a> *channel)</td></tr>
<tr class="memdesc:ad289fcea4095b519b0ced40cfb89f693"><td class="mdescLeft">&#160;</td><td class="mdescRight">取得读缓冲区  <a href="a00052_ad289fcea4095b519b0ced40cfb89f693.html#ad289fcea4095b519b0ced40cfb89f693">更多...</a><br /></td></tr>
<tr class="separator:ad289fcea4095b519b0ced40cfb89f693"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a26e5ba64b710a168b780e2b845ba3cca"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00052_a26e5ba64b710a168b780e2b845ba3cca.html#a26e5ba64b710a168b780e2b845ba3cca">knet_channel_get_max_send_list_len</a> (<a class="el" href="a00056_aca9cd34897582aa9969245a93cc62fb5.html#aca9cd34897582aa9969245a93cc62fb5">kchannel_t</a> *channel)</td></tr>
<tr class="memdesc:a26e5ba64b710a168b780e2b845ba3cca"><td class="mdescLeft">&#160;</td><td class="mdescRight">取得发送链表最大长度限制  <a href="a00052_a26e5ba64b710a168b780e2b845ba3cca.html#a26e5ba64b710a168b780e2b845ba3cca">更多...</a><br /></td></tr>
<tr class="separator:a26e5ba64b710a168b780e2b845ba3cca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aba9f33720ab9f2d3ae59a75cf4f7841a"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00052_aba9f33720ab9f2d3ae59a75cf4f7841a.html#aba9f33720ab9f2d3ae59a75cf4f7841a">knet_channel_get_max_recv_buffer_len</a> (<a class="el" href="a00056_aca9cd34897582aa9969245a93cc62fb5.html#aca9cd34897582aa9969245a93cc62fb5">kchannel_t</a> *channel)</td></tr>
<tr class="memdesc:aba9f33720ab9f2d3ae59a75cf4f7841a"><td class="mdescLeft">&#160;</td><td class="mdescRight">取得接收缓冲区最大长度限制  <a href="a00052_aba9f33720ab9f2d3ae59a75cf4f7841a.html#aba9f33720ab9f2d3ae59a75cf4f7841a">更多...</a><br /></td></tr>
<tr class="separator:aba9f33720ab9f2d3ae59a75cf4f7841a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a232548ee5a65b9cdcd0475cefe8f9095"><td class="memItemLeft" align="right" valign="top">uint64_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00052_a232548ee5a65b9cdcd0475cefe8f9095.html#a232548ee5a65b9cdcd0475cefe8f9095">knet_channel_get_uuid</a> (<a class="el" href="a00056_aca9cd34897582aa9969245a93cc62fb5.html#aca9cd34897582aa9969245a93cc62fb5">kchannel_t</a> *channel)</td></tr>
<tr class="memdesc:a232548ee5a65b9cdcd0475cefe8f9095"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取管道UUID  <a href="a00052_a232548ee5a65b9cdcd0475cefe8f9095.html#a232548ee5a65b9cdcd0475cefe8f9095">更多...</a><br /></td></tr>
<tr class="separator:a232548ee5a65b9cdcd0475cefe8f9095"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1119c9eaa72eae57119c600663fa413"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00052_af1119c9eaa72eae57119c600663fa413.html#af1119c9eaa72eae57119c600663fa413">knet_channel_send_list_reach_max</a> (<a class="el" href="a00056_aca9cd34897582aa9969245a93cc62fb5.html#aca9cd34897582aa9969245a93cc62fb5">kchannel_t</a> *channel)</td></tr>
<tr class="memdesc:af1119c9eaa72eae57119c600663fa413"><td class="mdescLeft">&#160;</td><td class="mdescRight">发送链表内缓冲区数量是否达到最大  <a href="a00052_af1119c9eaa72eae57119c600663fa413.html#af1119c9eaa72eae57119c600663fa413">更多...</a><br /></td></tr>
<tr class="separator:af1119c9eaa72eae57119c600663fa413"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
生成于 2015年 七月 27日 星期一 14:33:19 , 为 knet使用  &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
